const { defineConfig } = require('@vue/cli-service')

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
    configureWebpack: {
        plugins: [new NodePolyfillPlugin()]
    },
    transpileDependencies: ['@riophae/vue-treeselect'],
    devServer: {
        host: 'localhost',
        port: 8082,
        open: true,
        proxy: {
            '/api': {
                target: 'http://8.142.123.5:9080',
                changeOrigin: true,
                pathRewrite: {
                    ['^/api']: ''
                }
            }
            /*'/profile': {
                target: 'http://localhost:8080',
                changeOrigin: true,
                pathRewrite:
                    ['^/profile']: ''
                }
            }*/
        }
    }
})
